<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page import="com.crm.entity.Opportunity,com.crm.entity.Supplier,java.util.*" %>
<head>
<link href="<%=application.getContextPath()%>/css/css-crm.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.nightly.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#quottab').dataTable();
	} );
</script>
<script type="text/javascript">
function quotclick(refid){
	
	//var refid=$('#reflistid option:selected').val();
	if((refid==null)||(refid=="")){
		jAlert("Please Select Refrence Number");
		return false;
	}
	else{
	var data="refno="+refid;
	$("#ajaxLoader").show();
	$.ajax({
		url:"<%=application.getContextPath()%>/printquot/openQuotation.do",
		mimetype: "text/html",
		method: "post",
		data:data,
		cache:false,
		success: function(res){
			$('#quotdiv').html(res);
			
			}
		}).done(function(html){
			$("#ajaxLoader").hide();
			/* alert("Ajax Loading Completed"); */
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	}
}
    </script>   
</head>
<body>
<%List<Opportunity> opprtlist =(List<Opportunity>)request.getAttribute("opprtunity");%>
<div id="main">
   <%@ include file="common/header.jsp" %>
  <%@ include file="common/submenu.jsp" %>
  <div id="content">
   <div id="resultMsg" class="result_msg">
    <% 
   String msg= request.getParameter("msgsrc");
    	if(msg!=null){
    		System.out.println(msg);
    		out.println(msg);
    	}
    	
    %>
    </div>
  <form id="impform" name="impform"  action=""   method="post">
    <div id="work-area2">
      <div class="heading2">Print Quotation</div>
	  
	  
	  <div class="boxIFS2">
	  <div id="ajaxLoader" style="display:none" align="center"><img src="<%=application.getContextPath()%>/images/ajax_loader.gif"/></div>
      <table style="height:20px;" ><tr><td valign="top"><div id="quotdiv" class="boxtable"></div></td></tr></table> 
	  </div>
	  <div class="boxIFS2">
	  <div id="demo">
	    <table width="100%" id="quottab" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
	    <thead>
          <tr>
            <th width="30" height="30" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x">S.No</th>
            <th width="109" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Reference Number </th>
            <th width="109" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number </th>
            <th width="109" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Client</th>
            <th width="109" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Division</th>
            <th width="109" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Type</th>
          </tr>
          </thead>
          <tbody>
           <%  
           if(opprtlist!=null){
            	 
      	      	for(int i=0;i<opprtlist.size();i++){ 
           %>
          <tr >
            <td style="height:20px color:#FFFFFF ;" align="center"><%=i+1 %></td>
            <td align="center" valign="top" ><a href="#" class="linkclass" onclick="javascript: return quotclick('<%=opprtlist.get(i).getRefNum() %>');"><%=opprtlist.get(i).getRefNum() %></a></td>
            <td bgcolor="#FFFFFF" align="center" valign="top" ><%=opprtlist.get(i).getEnqnum() %></td>
            <td bgcolor="#FFFFFF" align="center" valign="top" ><%=opprtlist.get(i).getOrganisation() %></td>
            <td bgcolor="#FFFFFF" align="center" valign="top" ><%=opprtlist.get(i).getDivision() %></td>
            <td bgcolor="#FFFFFF" align="center" valign="top" ><%=opprtlist.get(i).getEnquirytype() %></td>
          </tr>
       <%
 			
   	      	}
           }
       %>
       </tbody>
        </table>
     	  </div>
    
	  </div>
	  
    </div>
    </form>
  </div>
  <div id="footer"></div>  
</div>
</body>
<!-- InstanceEnd --></html>

